// @ts-ignore
import { createRouter, RouteRecordRaw, createWebHashHistory } from "vue-router";
import Login from "../views/Login.vue";
import Home from "../views/Home.vue";
import SequenceDesign from "../views/DataAnalysis/SequenceDesign.vue";

import SequenceSave from "../views/DataAnalysis/SequenceSave.vue";

import MulSequenceDesign from "../views/DataAnalysis/MulSequenceDesign.vue";
import RequestManagement from "../views/DataAnalysis/RequestManagement.vue";
import DesignLibrary from "../views/DataAnalysis/DesignLibrary.vue";
import AddRequestRecord from "../views/DataAnalysis/AddRequestRecord.vue";
import SequenceManagement from "../views/DataManagement/SequenceManagement.vue";
import SequenceImport from "../views/DataManagement/SequenceImport.vue";
import AddSequenceRecord from "../views/DataManagement/AddSequenceRecord.vue";
import SequenceRecordDetails from "../views/DataManagement/SequenceRecordDetails.vue";
import RequestRecordDetails from "../views/DataManagement/RequestRecordDetails.vue";
import AddNewVerison from "../views/DataManagement/AddNewVersion.vue";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    redirect: "/login",
    meta: {},
  },

  {
    path: "/login",
    name: "Login",
    component: Login,
    meta: {
      fullScreen: true,
    },
  },
  {
    path: "/home",
    name: "Home",
    component: Home,
    meta: {
      fullScreen: false,
    },
  },
  {
    path: "/addRequestRecord",
    name: "AddRequestRecord",
    component: AddRequestRecord,
    meta: {
      requirAuth: true,
    },
  },
  {
    path: "/requestManagement",
    name: "RequestManagement",
    component: RequestManagement,
    meta: {
      requirAuth: true,
    },
  },
  {
    path: "/designLibrary",
    name: "DesignLibrary",
    component: DesignLibrary,
    meta: {
      requirAuth: true,
    },
  },
  {
    path: "/sequenceDesign",
    name: "SequenceDesign",
    component: SequenceDesign,
    meta: {
      requirAuth: true,
    },
  },

  {
    path: "/sequenceSave",
    name: "SequenceSave",
    component: SequenceSave,
    meta: {
      requirAuth: true,
    },
  },

  {
    path: "/mulSequenceDesign",
    name: "MulSequenceDesign",
    component: MulSequenceDesign,
    meta: {
       requirAuth: true,
    },
  },
  {
    path: "/sequenceManagement",
    name: "SequenceManagement",
    component: SequenceManagement,
    meta: {
      requirAuth: true,
    },
  },
  {
    path: "/addSequenceRecord",
    name: "AddSequenceRecord",
    component: AddSequenceRecord,
    meta: {
      requirAuth: true,
    },
  },
  {
    path: "/addNewVersion",
    name: "AddNewVersion",
    component: AddNewVerison,
    meta: {
      requirAuth: true,
    },
  },
  {
    path: "/sequenceImport",
    name: "SequenceImport",
    component: SequenceImport,
    meta: {
      requirAuth: true,
    },
  },
  {
    path: "/sequenceRecordDetails",
    name: "SequenceRecordDetails",
    component: SequenceRecordDetails,
    meta: {
      requirAuth: true,
    },
  },
    {
        path: "/requestRecordDetails",
        name: "RequestRecordDetails",
        component: RequestRecordDetails,
        meta: {
            requirAuth: true,
        },
    },

];

const router = createRouter({
  history: createWebHashHistory(process.env.VUE_APP_BASE_URL),
  routes,
});

export default router;
